$dir
$dir : string
The plugin loader and global API
$dir : string
$url : string
$task : string
$initialized : bool
init(\rcube $app, string $task = '') : mixed
Initialize plugin engine
This has to be done after rcmail::load_gui() or rcmail::json_init() was called because plugins need to have access to rcmail->output
\rcube | $app | Instance of the rcube base class |
string | $task | Current application task (used for conditional plugin loading) |
load_plugins(array $plugins_enabled, array $plugins_required = []) : mixed
Load and init all enabled plugins
This has to be done after rcmail::load_gui() or rcmail::json_init() was called because plugins need to have access to rcmail->output
array | $plugins_enabled | List of configured plugins to load |
array | $plugins_required | List of plugins required by the application |
load_plugin(string $plugin_name, bool $force = false, bool $require = true) : bool
Load the specified plugin
string | $plugin_name | Plugin name |
bool | $force | Force loading of the plugin even if it doesn't match the filter |
bool | $require | Require loading of the plugin, error if it doesn't exist |
True on success, false if not loaded or failure
get_info(string $plugin_name) : array
Get information about a specific plugin.
This is either provided by a plugin's info() method or extracted from a package.xml or a composer.json file
string | $plugin_name | Plugin name |
Meta information about a plugin or False if plugin was not found
register_action(string $action, string $owner, callable $callback, string $task = null) : mixed
Let a plugin register a handler for a specific request
string | $action | Action name (_task=mail&_action=plugin.foo) |
string | $owner | Plugin name that registers this action |
callable | $callback | A callback function |
string | $task | Task name registered by this plugin |